#pragma once

//#include <winsock.h>   
#include <winsock2.h>
#include <stdio.h>   
#include <process.h>

#include "../Json/Jsoncpp/json.h"
#include "Def.h"

void thread_recv(void*);



#define BUFFSIZE 1024

class LSocket
{

public:
	LSocket(void);
	virtual ~LSocket(void);

private:
	struct sockaddr_in server_addr;   
	

public:
	int clientSock;
	int status;
	char m_buff[BUFFSIZE]; 

private:
	
	void sendPacket( USHORT packetId, char* jsonData, int jsonLen );

public:
	void init();
	void analyPacket( int packetID,char* msgData );
	void sendMsg( int packetID );

};
